/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.projetoObras.connection;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;


/**
 *
 * @author viniciusvdias
 */
public class ConnectionFactory {
    
    public static Connection getConnection() throws SQLException{
        try {
            Class.forName("org.postgresql.Driver");
            return DriverManager.getConnection("jdbc:postgresql://localhost:5432/obras-db",
                    "postgres", "postgres");
        } catch (ClassNotFoundException ex) {
            throw new SQLException(ex.getMessage());
        }
    }
    
}
